/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package epam_java.telephone.services;
import epam_java.telephone.bill.Bill;
import java.io.PrintWriter;

/**
 *
 * @author 1
 */
abstract public class AbstractService {
    /**
     * service name
     */
    protected String name;
    /**
     * service description
     */
    protected String description;
    /**
     * serviceNumber
     * this field also identificate service in database
     */
    protected int serviceNumber;
    /**
     * price of one unit of some service
     * it is may be price of one second or one minutes
     * of telephone conversation of may be price of
     * one megabyte of internet traphic or some else.
     * cost of bill defines as composition of serviceNumber
     * and countServices
     */
    protected double priceUnit;
    /**
     * it string representation of units
     * it is may be "сек", "мин", "мб" and else.
     */
     protected String unitsValue;
    /**
     * @return the name
     */

    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the serviceNumber
     */
    public int getServiceNumber() {
        return serviceNumber;
    }

    /**
     * @param serviceNumber the serviceNumber to set
     */
    public void setServiceNumber(int serviceNumber) {
        this.serviceNumber = serviceNumber;
    }

    /**
     * @return the priceUnit
     */
    public double getPriceUnit() {
        return priceUnit;
    }

    /**
     * @param priceUnit the priceUnit to set
     */
    public void setPriceUnit(double priceUnit) {
        this.priceUnit = priceUnit;
    }

    /**
     * @return the unitsValue
     */
    public String getUnitsValue() {
        return unitsValue;
    }

    /**
     * @param unitsValue the unitsValue to set
     */
    public void setUnitsValue(String unitsValue) {
        this.unitsValue = unitsValue;
    }
    public abstract Bill doService(PrintWriter streamout);
}
